Skip to content

Fix duplicate keys issue with ol and ul #251

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2022
Merged

Fix duplicate keys issue with ol and ul #251

merged 1 commit into from
Feb 24, 2022

Conversation

unindented
Copy link
Contributor

@unindented unindented commented Feb 20, 2022

Fixes #250


This could have been caught with ESLint. We could configure with an .eslintrc.json like:

{
  "parserOptions": {
    "ecmaVersion": "latest",
    "sourceType": "module",
    "ecmaFeatures": {
      "jsx": true
    }
  },
  "env": {
    "node": true,
    "jest": true
  },
  "extends": "eslint:recommended"
}

And it would have complained like this:

tailwindcss-typography/src/styles.js
  108:9  error  Duplicate key 'ol'  no-dupe-keys
  114:9  error  Duplicate key 'ul'  no-dupe-keys
  290:9  error  Duplicate key 'ol'  no-dupe-keys
  296:9  error  Duplicate key 'ul'  no-dupe-keys
  472:9  error  Duplicate key 'ol'  no-dupe-keys
  478:9  error  Duplicate key 'ul'  no-dupe-keys
  654:9  error  Duplicate key 'ol'  no-dupe-keys
  660:9  error  Duplicate key 'ul'  no-dupe-keys
  836:9  error  Duplicate key 'ol'  no-dupe-keys
  842:9  error  Duplicate key 'ul'  no-dupe-keys

@vercel
Copy link

vercel bot commented Feb 20, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/tailwindlabs/tailwindcss-typography/Ge3GywEAdShjoFK9qT3FQpU8fx7W
✅ Preview: https://tailwindcss-typography-git-fork-unindented-patch-2-tailwindlabs.vercel.app

@unindented
Copy link
Contributor Author

I think the issue got introduced in #216. @adamwathan could you take a quick look?

@adamwathan
Copy link
Member

Not today but hoping to catch up on issues and PRs over the next couple of weeks. Thanks!

@RobinMalfait RobinMalfait self-assigned this Feb 24, 2022
@RobinMalfait
Copy link
Member

Hey! Thank you for your PR!
Much appreciated! 🙏

Yep this bug got introduced incorrectly, the good part is that there is not much of a visual difference because of margin collapsing

@RobinMalfait RobinMalfait merged commit e50b744 into tailwindlabs:master Feb 24, 2022
@unindented unindented deleted the patch-2 branch February 24, 2022 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ol and ul keys are duplicated in styles.js, resulting in some styles not being applied
3 participants